const PersonAbout = {
  namespaced: true,
  state: {
    personLists: [{
      id: '001',
      name: "张三"
    }]
  },
  actions: {
    ADD_WANG(context, personObj) {
      if (personObj.name.indexOf('王') != -1) {
        context.commit("ADD_PERSON", personObj)
      } else {
        alert("请输入姓王的人名")
      }
    }
  },
  mutations: {
    ADD_PERSON(state, personObj) {
      state.personLists.unshift(personObj)
    },
    ADDPERSONSERVER(state, personObj) {
      state.personLists.unshift(personObj)
    }
  },
  getters: {

  }
}
export default PersonAbout